/**  
 * @Title: GameComment.java
 * @Package com.nubb.model
 * @author maoyun(maoyun0903@163.com)
 * @date 2014-3-27 下午01:35:53
 * @version V1.0
 */ 
package com.limit.model;

import java.util.List;

import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;

/** 
 * <br/>
 * @author maoyun(maoyun@nubb.com)
 * @date 2014-3-27 下午01:35:53 
 * @version V1.0
 */
public class GameComment extends Model<GameComment> {

	
	public final static GameComment dao = new GameComment();
	
	
	public List<GameComment> findListByGId(long id){
		
		return super.find("select * from game_comment where game_id=?", id);
		
	}


	/** 
	 * 根据游戏ID获取分页列表
	 */
	public Page<GameComment> paginateList(long game_id , int pageNow ,int pageSize ) {
		
		return this.paginate(
							pageNow, 
							pageSize, 
							"select *", 
							"from game_comment where game_id=? order by useful desc",game_id);
	}

	
}
